package top.tangyh.lamp.care.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import top.tangyh.basic.base.mapper.SuperMapper;
import top.tangyh.lamp.care.entity.BCareIsbarHandoverDetail;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * ISBAR护理交班明细表
 * </p>
 *
 * @author zqb
 * @date 2024-08-12 10:28:25
 * @create [2024-08-12 10:28:25] [zqb] [代码生成器生成]
 */
@Repository
public interface BCareIsbarHandoverDetailMapper extends SuperMapper<BCareIsbarHandoverDetail> {

    default List<BCareIsbarHandoverDetail> selectListByRecordId(Long recordId) {
        LambdaQueryWrapper<BCareIsbarHandoverDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BCareIsbarHandoverDetail::getRecordId, recordId);
        return this.selectList(queryWrapper);
    }

    /**
     * 根据记录id删除
     *
     * @param redcordId
     */
    default void deleteByRecordId(Long redcordId) {
        LambdaQueryWrapper<BCareIsbarHandoverDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BCareIsbarHandoverDetail::getRecordId, redcordId);
        this.delete(queryWrapper);
    }

}


